using System.IO;
using RFS.Domain.PaiShi;
using ycx;

namespace RFS.WPF.utils
{
    using System;
    using System.Collections.Generic;


    public static class Ex
    {
        
        static string  f = "KIPADkDic.json";

        
       static List<ProductInfo> _products  ;

        public static IList<ProductInfo> GetProductInfo(this object  o)
        {
            if (_products == null)
            {
                var j = File.ReadAllText(f);
                var re=j.ToObject<List<ProductInfo>>();
                _products = re;
            }
            return _products;

        }
        
    }
}

// 示例：如何使用这个类进行序列化和反序列化

 